home *** CD-ROM | disk | FTP | other *** search
/ DOS Vuser Deluxe 2003 October / DOS Vuser Deluxe 2003 Oct - Disc 1.iso / SKIN / AutoToneMP3.wmz / autotone.js < prev    next >
Text File  |  2002-09-04  |  4KB  |  187 lines

  1. /*
  2. ⌐2000 Microsoft Corporation. All rights reserved.
  3. */
  4. function OnOpenStateChange()
  5. {
  6.     if(player.OpenState == osMediaOpen)
  7.     {
  8.         UpdateMetadata();
  9.     }
  10. }
  11. /*
  12. The following function has been modified to set the tone setting to match the Genre information saved in the media file.  Other than that, it simply populates the scrolling information variable for screen display. (-TG08262002) 
  13. */
  14. function UpdateMetadata()
  15. {
  16.     metadata.value =
  17.         player.currentmedia.getiteminfo("author");
  18.     var temp = player.currentmedia.name;
  19.     var temptime = player.currentMedia.durationString;
  20.     var tempgenr = player.currentmedia.getiteminfo("Genre");
  21.     var tempstat = player.status;
  22.     switch(tempgenr) {
  23.     case "Rock":
  24.         wmpprop:eq.currentPreset = 1;
  25.         break;
  26.     case "Classic Rock":
  27.         wmpprop:eq.currentPreset = 1;
  28.         break;
  29.     case "Alternative":
  30.         wmpprop:eq.currentPreset = 1;
  31.         break;
  32.     case "Alternative Rock":
  33.         wmpprop:eq.currentPreset = 1;
  34.         break;
  35.     case "Rap":
  36.         wmpprop:eq.currentPreset = 2;
  37.         break;
  38.     case "Jazz":
  39.         wmpprop:eq.currentPreset = 3;
  40.         break;
  41.     case "Acoustic":
  42.         wmpprop:eq.currentPreset = 4;
  43.         break;
  44.     case "Classical":
  45.         wmpprop:eq.currentPreset = 4;
  46.         break;
  47.     case "Country":
  48.         wmpprop:eq.currentPreset = 5;
  49.         break;
  50.     case "Folk":
  51.         wmpprop:eq.currentPreset = 6;
  52.         break;
  53.     case "Custom":
  54.         wmpprop:eq.currentPreset = 7;
  55.         break;
  56.     case "Other":
  57.         wmpprop:eq.currentPreset = 7;
  58.         break;
  59.     case "R&B":
  60.         wmpprop:eq.currentPreset = 3;
  61.             break;
  62.     case "Blues":
  63.         wmpprop:eq.currentPreset = 3;
  64.         break;
  65.     case "Pop":
  66.         wmpprop:eq.currentPreset = 1;
  67.         break;
  68.     case "Bluegrass":
  69.         wmpprop:eq.currentPreset = 4;
  70.         break;
  71.     default:
  72.         wmpprop:eq.currentPreset = 7; }
  73.  
  74.     if(temp != "")
  75.     {
  76.         if(metadata.value != "")
  77.         {
  78.             metadata.value +=  " - ";
  79.         }
  80.     metadata.value += temp;
  81.     
  82.     if(tempgenr != "")
  83.         {
  84.         metadata.value +=  " - Genre: ";
  85.         metadata.value +=  tempgenr;
  86.     }
  87.        }
  88.     
  89.     metadata.value += " - ";
  90.     metadata.value += tempstat;
  91.     metadata.scrolling = metadata.textWidth>metadata.width;
  92.  
  93.    
  94.  
  95. }
  96.  
  97. var vidIsRunning="false"
  98.  
  99. function Init()
  100. {
  101.     VidVis();
  102. }
  103.  
  104. function VisVis()
  105. {
  106.     bigvis.visible =
  107.         (player.playstate == psPlaying ||
  108.          player.playstate == psPaused);
  109.     video.visible = false;
  110. }
  111.  
  112. function VidVis()
  113. {
  114.     if(player.currentMedia.ImageSourceWidth>0 &&
  115.        (player.playstate == psPlaying ||
  116.             player.playstate == psPaused) )
  117.     {
  118.         vid.visible = true;
  119.         video.visible = true;
  120.         bigvis.visible = false;
  121.         vm.down = true;
  122.     }
  123.     else
  124.     {
  125.         video.visible = false;
  126.         VisVis();
  127.     }
  128. }
  129.  
  130. function VidSwitch()
  131. {
  132.     if(player.currentMedia.ImageSourceWidth>0 &&
  133.        (player.playstate == psPlaying ||
  134.             player.playstate == psPaused) )
  135.     {
  136.         theme.CurrentViewId = "normal";
  137.         VidVis();
  138.     }
  139. }
  140.  
  141. function slide()
  142. {
  143.     brib.down = false;
  144.     bri.visible = false;
  145.     conb.down = false;
  146.     con.visible = false;
  147.     hueb.down = false;
  148.     hue.visible = false;
  149.     satb.down = false;
  150.     sat.visible = false;
  151.     visswitchb.down = false;
  152.     visswitch.visible = false;
  153. }
  154.  
  155. function vidmodebut()
  156. {
  157.     if(player.currentMedia.ImageSourceWidth>0 &&
  158.        (player.playstate == psPlaying ||
  159.             player.playstate == psPaused) )
  160.     {
  161.         nmsm.enabled = false;
  162.         nmmm.enabled = false;
  163.     }
  164.     else
  165.     {
  166.         nmsm.enabled = true;
  167.         nmmm.enabled = true;
  168.     }
  169. }
  170.  
  171. function VidOpen()
  172. {
  173.     if(player.OpenState == osMediaOpen)
  174.     {
  175.         vidIsRunning =
  176.             (player.currentMedia.ImageSourceWidth>0);
  177.     }
  178. }
  179.  
  180. function VidSwitchII()
  181. {
  182.     VidOpen();
  183.     if(vidIsRunning)
  184.     {
  185.         VidSwitch();
  186.     }
  187. }